<template>
	<view class="p30">
		<cust-empty desc="暂无数据" v-if="loadStatus=='none'">
				</cust-empty>
		<view>
			<time-record :list="list">
				<template v-slot="{ data }">
					<locate-start-end
						@click="$navigateTo('/pagesHome/views/trackPath?id='+data.id+'&start='+data.startAddress+'&end='+data.endAddress)"
						:start="data.startAddress" :end="data.endAddress"></locate-start-end>
				</template>
			</time-record>
		</view>
		<view class="nomore" v-if="loadStatus != 'none'">
			<u-loadmore :status="loadStatus" />
		</view>
	</view>
</template>

<script>
	import timeRecord from "@/components/simple/time-record.vue";
	import LocateStartEnd from "../components/locate-start-end";
	import {
		getTravelingTrackListAPI
	} from "@/api/api/map.js"
	import pages from "@/mixins/pages.js"
	import custEmpty from "@/components/cust-empty/index.vue";
	import {
			mapState
		} from 'vuex'
	export default {
		components: {
			timeRecord,
			LocateStartEnd,
			custEmpty
		},
		mixins: [pages],
		data() {
			return {}
		},
		
		computed: {
					...mapState(["deviceData"])
				},
		onLoad() {
			this.type = "object";
			this.mode = "day";
			this.showPropListCallcack= (obj,item)=>{
				return {
					...obj,
					id:item.id,
					startAddress:item.startAddress,
					endAddress:item.endAddress
				}
			};
			this.params = {
				carId: this.deviceData.id
			}
			this.funAPI = getTravelingTrackListAPI;
			this.initList();
			this.getListFun();
		},
		
		
	}
</script>

<style>
</style>
